<?php 
include '../data/data.php';
$user=$_SESSION['user']; //获取到的用户名
$pass=$_SESSION['pass']; //获取到的密码
$result= mysql_query("SELECT * FROM user WHERE username='$user' and password='$pass'", $link);  
$row = mysql_fetch_array($result);
if($row[id]==''){
	header('location:/user/login.html?fwd=/user/games.html');
}
?><html><head lang="en">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title>最近在玩</title>
<link rel="stylesheet" href="/public/styles/base.css">

    <link rel="stylesheet" href="/css/new.css">
    <link rel="stylesheet" href="/styles/ranking.css">
</head>
<body class="bg00">
<div data-role="page" class="z_container bg01">
    <div class="main">
        <header class="z_header">
            <div class="toptil">
                <a href="/user/user.html"><img src="/picture/icon_20.png" alt=""></a>
                <p>换绑次数（<?php echo $row[huanbang]; ?>）</p>
            </div>
        </header>
        <section class="game_list" style="height: auto; padding-top: 10px;">
                 <?php  
$resultc = $conn->query("SELECT id, game_id FROM games_vip WHERE user_id='$user' ORDER BY id DESC");
if ($resultc->num_rows > 0) {
    while($rowc = $resultc->fetch_assoc()) {
?>
<?php  
      $gameid=$rowc[game_id];
$resultx = $conn->query("SELECT id, logo, name, renqi, xingji, type, jianjie FROM games WHERE id='$gameid' ORDER BY id DESC limit 3");
if ($resultx->num_rows > 0) {
    while($rowx = $resultx->fetch_assoc()) {
     if($rowx[type]=='MV'){
      $cbx='满V版';
      }elseif($rowx[type]=='BT'){
      $cbx='超变版';
      }elseif($rowx[type]=='GM'){
      $cbx='GM版';
      }
    echo '    <section class="list_content" style="height: auto;   padding: 5px 4%;">
                    <div class="game_log relative">
                        <a target="_top" href="/game/detail.html?game_id='.$rowx[id].'"><img src="'.$rowx[logo].'" width="100%" height="auto" alt="'.$rowx[name].'"></a>
                    </div>
                    <div class="game_info">
                        <h3>
                            <span class="hidden"><a target="_top" href="/game/detail.html?game_id='.$rowx[id].'" title="'.$rowx[name].'" style="color:#333333;">'.$rowx[name].$cbx.'</a></span>
                                                            <i class="i_hot"></i>
                                                    </h3>
                        <p style="margin:6px 0 5px 0;">
                        <span class="start_list fl">
                                       </span>
                            <span class="" style="padding: 0 1px 0;color:#5398FD;font-size: 12px;"><span style="color: #666666;">人气：</span>'.$rowx[renqi].'万+</span>
                        </p>
                        <p>'.$rowx[jianjie].'</p>
                    </div>
                    <div class="game_btn">
                        <a target="_top" href="/game/cok.html?game_id='.$rowx[id].'" style="background: #5398FD;" class="btn_blue">解除绑定</a>
                    </div>
                    <div style="clear: both"></div>
                </section>';
    }
}
 ?>


<?php
    }
}
?>  
          
                  
                    </section>
    </div>
    <div class="footer_padding"></div>
</div>
<!--footer 底部 start-->
<footer id="footer" class="z_footer" style="">
    <nav>
        <a target="_top" href="/index.html" style="margin-left: 2%;" >
            <p class="img_1"><img src="/picture/home.png" alt=""></p>
            <p class="img_2"><img src="/picture/home1.png" alt=""></p>
            <span>首页</span>
        </a>
        <a target="_top" href="/game/type.html?tc=GM" >
            <p class="img_1"><img src="/picture/game.png" alt=""></p>
            <p class="img_2"><img src="/picture/game1.png" alt=""></p>
            <span>GM</span>
        </a>
        <a target="_top" href="/game/game.html?tc=rm" title="">
            <p class="img_1"><img src="/picture/game.png" alt=""></p>
            <p class="img_2"><img src="/picture/game1.png" alt=""></p>
            <span>BT</span>
        </a>
        <a target="_top" href="/user/user.html" title="" id="footer_nav_active">
            <p class="img_1"><img src="/picture/user.png" alt=""></p>
            <p class="img_2"><img src="/picture/user1.png" alt=""></p>
            <span>我的</span>
        </a>
    </nav>
</footer>
<link href="/css/app.css" rel="stylesheet" type="text/css">
<div id="weixin_an" style="display: none">
    <div class="click_opacity"></div>
    <div class="to_btn">
        <span class="span1"><img src="/public/channel/click_btn.png"></span>
        <span class="span2"><em>1</em> 点击右上角<img src="/public/channel/menu_android.png">打开菜单</span>
        <span class="span2 android_open"><em>2</em> 选择<img src="/public/channel/android.png"></span>
        <span class="span2 android_open"><em>3</em> 重新登录账号充值</span>
    </div>
</div>

<!--二维码-->
<script src="/public/scripts/jquery-1.11.1.min.js"></script>
<script src="/public/scripts/jquery.qrcode.min.js"></script>

<!--<div class="qrcode_image">-->
<!--        <img src="/qrcode/game.html?addr=--><!--">-->
<!--</div>-->
<script src="/public/scripts/jquery-1.11.1.min.js"></script>
<script>$('#footer a:eq(5)').attr('id', 'footer_nav_active');</script>

</body></html>